﻿using System.Xml;
using System.Xml.Serialization;

namespace Bpmn.Xml;

/// <remarks/>
[XmlInclude(typeof(Edge))]
[XmlInclude(typeof(LabeledEdge))]
[XmlInclude(typeof(BpmnEdge))]
[XmlInclude(typeof(Node))]
[XmlInclude(typeof(Plane))]
[XmlInclude(typeof(BpmnPlane))]
[XmlInclude(typeof(Label))]
[XmlInclude(typeof(BpmnLabel))]
[XmlInclude(typeof(Shape))]
[XmlInclude(typeof(LabeledShape))]
[XmlInclude(typeof(BpmnShape))]
[Serializable]
[XmlType(Namespace = "http://www.omg.org/spec/DD/20100524/DI", TypeName = "DiagramElement")]
[XmlRoot(Namespace = "http://www.omg.org/spec/DD/20100524/DI", IsNullable = false)]
public abstract partial class DiagramElement
{
    /// <remarks/>
    [XmlElement("extension")]
    public DiagramElementExtension Extension { get; set; } = default!;

    /// <remarks/>
    [XmlAttribute("id", DataType = "ID")]
    public string Id { get; set; } = default!;

    /// <remarks/>
    [XmlAnyAttribute]
    public XmlAttribute[] AnyAttr { get; set; } = default!;
}
